<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:faces="http://java.sun.com/jsf/composite/faces/components">

	<composite:interface>
		<composite:attribute name="message" default="确定要执行该操作？" />
		<composite:attribute name="action" required="true" method-signature="void action()" />
		<composite:attribute name="cancelValue" default="取消" />
		<composite:attribute name="confirmValue" default="确定" />
		<composite:attribute name="onCancel" />
		<composite:attribute name="onConfirm"/>
		<composite:attribute name="value" required="true"/>
	</composite:interface>
	<composite:implementation>
		<div style="display:none">
			<rich:popupPanel id="confirmPopup" header="系统信息" autosized="true" width="300" height="100">
				<p class="messageContent">#{cc.attrs.message}</p>
				<a4j:commandButton action="#{cc.attrs.action}"
					value="#{cc.attrs.confirmValue}" execute="@form" render="@form"
					onclick="#{rich:component('confirmPopup')}.hide();#{cc.attrs.onConfirm}" />
				<input type="button" value="#{cc.attrs.cancelValue}"
					onclick="#{rich:component('confirmPopup')}.hide();#{cc.attrs.onCancel}" />
			</rich:popupPanel>
		</div>
		<input type="button" value="#{cc.attrs.value}" onclick="#{cc.attrs.onclick};#{rich:component('confirmPopup')}.show()"/>
	</composite:implementation>
</ui:composition>